package com.central.scheduler.remote.command.log;

import com.central.scheduler.remote.command.Command;
import com.central.scheduler.remote.command.CommandType;
import com.central.scheduler.common.utils.JSONUtils;

import java.io.Serializable;

/**
 * @author Tindy
 * @date 2021/10/29
 * @describe
 *  remove task log request command
 */
public class RemoveTaskLogResponseCommand implements Serializable {

    /*TaskPriorityQueueConsumer.*
     *  log path
     */
    private Boolean status;

    public RemoveTaskLogResponseCommand() {
    }

    public RemoveTaskLogResponseCommand(Boolean status) {
        this.status = status;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    /**
     * package request command
     *
     * @return command
     */
    public Command convert2Command(long opaque) {
        Command command = new Command(opaque);
        command.setType(CommandType.REMOVE_TAK_LOG_RESPONSE);
        byte[] body = JSONUtils.toJsonByteArray(this);
        command.setBody(body);
        return command;
    }
}
